package com.example.javabasic.thread.classtwo.lock.demo1;
//读写锁设计模式
// https://www.bilibili.com/video/BV1L4411i7eW?p=58
public class Test {
    public static void main(String[] args) {
        final ShareData data = new ShareData(10);
        for (int i = 0; i < 10; i++) {
            new ReaderWorker(data).start();
        }

        for (int i = 0; i < 2; i++) {
            new WriteWorker(data,"abcdefghijklmnopqrstuvwxyz").start();
        }

    }
}
